package com.hspedu.homework.homework13;

/**
 * 1.做一个Student类，Student类有名称name，性别sex，年龄age，学号stu_id，做合理封装，通过构造器在创建对象时将四个属性赋值
 */
public class Student extends Person{
    private int stu_id;

    public Student() {
    }

    public Student(String name, String sex, int age, int stu_id) {
        super(name, sex, age);
        this.stu_id = stu_id;
    }

    @Override
    public String play() {
        return super.play()+"足球";
    }

    public void study(){
        System.out.println("我承诺，我会好好学习");
    }

    public int getStu_id() {
        return stu_id;
    }

    public void setStu_id(int stu_id) {
        this.stu_id = stu_id;
    }
}
